package com.nfc.lock.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nfc.lock.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户Mapper
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    /**
     * 根据用户名查询
     */
    User selectByUsername(@Param("username") String username);

    /**
     * 根据区域ID查询用户列表
     */
    List<User> selectByRegionId(@Param("regionId") Long regionId);

    /**
     * 根据层级路径查询用户
     */
    List<User> selectByLevelPath(@Param("levelPath") String levelPath);
}
